package com.maoxs;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/web")
public class TestController {
    @RequestMapping("/show")
    public String show() throws Exception {
        int i = 1 / 0;
        return "成功";
    }

    @RequestMapping("/show500")
    public void show500() {
        int i = 1 / 0;
        System.out.println(i);
    }

    @RequestMapping("/show400/{a}")
    public Object show500(@PathVariable("a") Integer a) {
        System.out.println(a);
        return a;
    }
}
